package com.lingyun.financialmanagement.controller;

import com.lingyun.financialmanagement.service.ComponentPartService;
import com.lingyun.financialmanagement.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("users")
public class UsersController {

    @Autowired
    private ComponentPartService componentPartService;

    // ~~~~~~~~~~~~元器件~~~~~~~~~~~~~~~
    // 元器件  删除通过id
    @PostMapping("deleteComponentById")
    public Result deleteComponentById(@RequestParam Integer id){
        return componentPartService.deleteComponentById(id);
    }

    // 元器件  查找所有待审核元件
    @GetMapping("selectReviewComponentByToken")
    public Result selectReviewComponentByToken(){
        return componentPartService.selectReviewComponentByToken();
    }
}
